package com.dk.service.impl;

import com.dk.mapper.TCityMapper;
import com.dk.pojo.TCity;
import com.dk.pojo.TCityExample;
import com.dk.service.TCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TCityServiceImpl implements TCityService {
    @Autowired
    private TCityMapper tCityMapper;

    @Override
    public List<TCity> getCityByPid(Integer pid) {
        TCityExample example = new TCityExample();
        TCityExample.Criteria criteria = example.createCriteria();
        criteria.andPidEqualTo(pid);
        return tCityMapper.selectByExample(example);
    }

    @Override
    public List<TCity> getSheng(Integer i) {
        TCityExample example = new TCityExample();
        TCityExample.Criteria criteria = example.createCriteria();
        criteria.andPidEqualTo(i);
        return tCityMapper.selectByExample(example);
    }
}
